package com.similarworld.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.similarworld.dao.AbstractDAO;
import com.similarworld.dao.UserDao;
import com.similarworld.model.User;

@Service
public class UserService extends AbstractService<User> {

	@Autowired
	UserDao dao;
	
	@Override
	protected AbstractDAO<User> getDAO() {
		return dao;
	}
	
	public User getByUsername(String username) {
		return dao.findFirstByKeyValue("username", username);
	}

}
